/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package it.unitn.science.matr155863_148346_145963.bccstore.items;

/**
 *
 * @author berto
 */
public class Product {
    
    public static final String ID="_id_product";
    public static final String NAME="name";
    public static final String PRICE="price";
    public static final String QUANTITY="quantity";
    public static final String UM="um";
    public static final String IMAGE="image";
    public static final String DESCRIPTION="description";
    public static final String SELLER="seller";
    public static final String CATEGORY="category";
    
    private Integer id;
    private String name;
    private Float price;
    private Integer quantity;
    private Integer umId;
    private String umName;
    private String imageName;
    private Integer imageId;
    private String description;
    private Integer sellerId;
    private Integer categoryId;
    private String sellerName;
    private String categoryName;

    public Product(){
    }
    
    public Product(Integer id, String name, Float price, 
            Integer quantity, Integer umId,String umName,
            Integer imageId, String imageName, String description, Integer sellerId, 
            Integer categoryId, String sellerName, String categoryName) {
        this.id=id;
        this.name=name;
        this.price=price;
        this.quantity=quantity;
        this.umId=umId;
        this.umName=umName;
        this.imageId=imageId;
        this.imageName=imageName;
        this.description=description;
        this.sellerId=sellerId;
        this.categoryId=categoryId;
        this.sellerName=sellerName;
        this.categoryName=categoryName;
    }

    public Integer getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Integer categoryId) {
        this.categoryId = categoryId;
    }

    public Integer getUmId() {
        return umId;
    }

    public void setUmId(Integer umId) {
        this.umId = umId;
    }

    public String getUmName() {
        return umName;
    }

    public void setUmName(String umName) {
        this.umName = umName;
    }

    public String getCategoryName() {
        return categoryName;
    }
    
    public String getHumanCategoryName(){
        if((categoryName==null)||(categoryName.equals(""))){
            return "Not found";
        }else{
            return categoryName;
        }
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public String getDescription() {
        return description;
    }
    
    public String getHumanDescription() {
        if((description==null)||(description.equals(""))){
            return "Not found";
        }else{
            return description;
        }
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getImageName() {
        return imageName;
    }

    public void setImageName(String image) {
        this.imageName= image;
    }

    public Float getPrice() {
        return price;
    }

    public void setPrice(Float price) {
        this.price = price;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public Integer getSellerId() {
        return sellerId;
    }

    public void setSellerId(Integer sellerId) {
        this.sellerId = sellerId;
    }

    public String getSellerName() {
        return sellerName;
    }
    
    public String getHumanSellerName(){
        if((description==null)||(description.equals(""))){
            return "Not found";
        }else{
            return description;
        }
    }

    public void setSellerName(String sellerName) {
        this.sellerName = sellerName;
    }

    public Integer getImageId() {
        return imageId;
    }
    
    public void setImageId(Integer id) {
        imageId=id;
    }
    
}
